#include<bits/stdc++.h>
using namespace std;
int sr[11111];
int sub[11111];
int main()
{
    int ci,i,j,sum,pos,cnt,m,n,wei,mx;scanf("%d",&ci);
    while(ci--)
    {

        scanf("%d%d",&n,&m);

        for(i=1;i<=n+1;i++){sub[i]=0;}
        for(i=1;i<=m;i++)
        {
            scanf("%d",&sr[i]);
        }
        sort(sr+1,sr+1+m);
        pos=1;sum=0;mx=0;wei=0;
        for(i=1;i<=m;i++)
        {
            sub[i]=sr[i]-1-sr[i-1];
            if(mx<=sub[i]){mx=sub[i];wei=i;}sum+=sub[i];
        }
        sub[m+1]=n-sr[m];if(mx<=sub[1+m]){mx=sub[1+m];wei=1+m;}sum+=sub[1+m];
//        for(i=1;i<=m+1;i++)
//        {
//            printf("%d : %d \n",i,sub[i]);
//        }
//        printf("%d %d %d\n",mx,wei,sum);
        if(mx<=(sum-mx))
        {
            printf("YES\n");
        }
        else
        {
            if(wei-1>=(mx-sum+mx))
            {
                printf("YES\n");
            }else{printf("NO\n");
            }
        }
    }
    return 0;
}
